﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MethodWorx.Core.Validation
{
    public interface IValidationProvider
    {
        /// <summary>
        /// Validate single instance
        /// </summary>
        /// <param name="instance"></param>
        bool Validate(object instance);

        /// <summary>
        /// Report an error
        /// </summary>
        /// <param name="message"></param>
        /// <param name="key"></param>
        void AddError(string key, string message);

        /// <summary>
        /// Is the validation provider valid
        /// </summary>
        /// <returns></returns>
        bool IsValid();
    }
}
